import { http } from '@/utils/http'
import type { newsItem } from '@/types/news'
export const PublishNewsAPI = (data: newsItem) => {
  return http({
    url: '/news/release',
    method: 'POST',
    data
  })
}
//修改新闻
export const modifyNewsAPI = (data: newsItem) => {
  return http({
    url: '/news/modifyNews',
    method: 'POST',
    data
  })
}
//删除新闻
export const deleteNewsAPI = (id: number) => {
  return http({
    url: `/news/deleteNews?newsId=${id}`,
    method: 'DELETE',
  })
}